import axios from 'axios'
import BaseApi from '@/api/BaseApi'
import config from '@/config'

/**
 * 业务推荐通道接口
 */
export default class extends BaseApi {
  /**
   * 获取基础路径
   *
   * @return 基础路径
   */
  static basePath() {
    return (config.services.oen || '') + '/recom'
  }

  // 链路推荐
  static linkRecom(params) {
    return axios.get(`${this.basePath()}/linkRecom`, { params })
  }

  // 通道推荐
  static channelRecom(params) {
    return axios.get(`${this.basePath()}/channelRecom`, { params })
  }

  // 逻辑通道分析
  static logicChannelAnalyze(params) {
    return axios.post(`${this.basePath()}/logicChannelAnalyze`, params)
  }

  // 业务备用通道分析
  static backChannelAnalyze(params) {
    return axios.get(`${this.basePath()}/backChannelAnalyze`, { params })
  }

  // 业务割接校验
  static bizCutoverCheck(params) {
    return axios.post(`${this.basePath()}/bizCutoverCheck`, params)
  }
}
